package exercise;

import java.util.ArrayList;

public class exercise_4 {
	public static void main(String[] args) {
		ArrayList<Integer> redArr = new ArrayList<>();
		int num = (int) (Math.random() * 6);
		redArr.add(num);
		for (int i = 0; i < 5; i++) {
			num = (int) (Math.random() * 6);

			if (redArr.contains(num)) {
				i--;
			} else {
				redArr.add(num);
			}
		}
		System.out.println(redArr);
	}
}
